package com.zhuxulin.java.email.busness;

import java.io.UnsupportedEncodingException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;

import com.zhuxulin.java.email.db.DBQuery;
import com.zhuxulin.java.email.db.bean.QQRowBean;

public class TestDBQuery {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		DBQuery db = DBQuery.getInstance();
		String mail="379269087@qq.com";
//		try {
//			System.out.println(db.isExit(mail));
//		} catch (UnsupportedEncodingException | SQLException e) {
//			e.printStackTrace();
//		}
//		System.out.println(db.getSendTimes(mail));
//		System.out.println(db.getLastSendDate(mail));
//		db.setLastSendDate(mail, new Date());
//		System.out.println(db.getLastSendDate(mail));
//		db.setSendTimes(mail, 12);
//		System.out.println(db.getSendTimes(mail));
//		db.addSendTimes(mail);
//		System.out.println(db.getSendTimes(mail));
		
		
//		ArrayList<QQRowBean> lists = db.getAllList();
//		for (QQRowBean q : lists) {
//			System.out.println(q);
//		}
//		System.out.println(lists.size());
		
		System.out.println(db.getQQRowBean(mail));
	}

}
